package com.example.widgetappone;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class WidgetReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        Log.d("xxx", "broadcastReceiver action " + action);
        Log.d(Constants.DEBUG_TAG, "WidgetReceiver broadcastReceiver action " + action);

//        if (Intent.ACTION_MY_PACKAGE_REPLACED.equals(action)) {
//            context.startForegroundService(new Intent(context, WidgetService.class));
//            return;
//        }

        WidgetObservable.getInstance().updateValue(intent);
    }
}
